package com.example.configdemo.model;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConfigurationProperties(prefix = "student")//从相应的配置文件里面获取数据
@Data
public class Student {
    //这样就能全部取值
    //获取的时候,名称是必须要能对上的
    private Integer id;
    private String name;
    private Integer age;
    private List<String> dbtype;
}
